package com.vogue.supplymall.order.domain.service;

import com.vogue.supplymall.common.annotation.AkkaRemoteServer;
import com.vogue.supplymall.common.domain.dto.OrderDetailInfo;
import com.vogue.supplymall.common.domain.dto.SearchOrderInfo;
import com.vogue.supplymall.order.domain.model.Order;

import java.util.List;
import java.util.Map;

/**
 * The interface Order servcice.
 *
 * @aouthor: zhangliang
 * @date: Create in 2018-01-10
 */
@AkkaRemoteServer
public interface OrderService extends BaseService<Order, Long> {

    /**
     * Add order order.
     *
     * @param order the order
     * @return the order
     */
    Order addOrder(Order order);

    /**
     * Find order detail list.
     *
     * @param detailInfo the detail info
     * @return the list
     */
    List<Map<String, Object>> findOrderDetail(OrderDetailInfo detailInfo);

    /**
     * Find order detail list.
     *
     * @param searchOrderInfo the search order info
     * @return the list
     */
    List<Map<String, Object>> findOrderList(SearchOrderInfo searchOrderInfo);

    /**
     * Find order detail list.
     *
     * @param searchOrderInfo the search order info
     * @return the list
     */
    List<Map<String, Object>> findOrderCount(SearchOrderInfo searchOrderInfo);
    
    /**
     * 更新订单评价状态
     * type 0:未评价 1:已评价
     */
    public void updateOrderCommentFlag(Long orderId,Long productId,int type) throws Exception;

    /**
     * 获取订单实体
     * @param orderNumber
     * @param syscodeid
     * @return
     */
    Order getOrder(String orderNumber, Long syscodeid);
}
